
#include <iostream>
using namespace std;
#include "ShareMemory.hpp"

int main()
{
    // 创建共享内存
    Sm.GetShm();
    // 挂接
    Sm.AttachShm();
    sleep(1);
    char *strinfo = (char *)Sm.GetAddr();
    // printf("client 虚拟地址：%p\n",strinfo);
    // sleep(1);
    char ch = 'A';
    while(ch <= 'Z')
    {
        sleep(3);
        strinfo[ch-'A'] = ch;
        ch++;
    }
    // 去关联
    Sm.DetachShm();

    cout << "client detach done.." << endl;
    return 0;
}